//
//  Http.h
//  cascade-realm
//
//  Created by QSC on 16/5/24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef void (^HttpSuccessBlock)(id responseObject);
typedef void (^HttpFailureBlock)(id errObject);
@interface Http : NSObject
+ (void)postWithURL:(NSString *)url params:(id)params success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

+ (void)LoginPostWithURL:(NSString *)url params:(id)params
            success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

+ (void)postWithURL:(NSString *)url params:(id)params isShowHud:(BOOL)isShowHud isLogin:(BOOL)isLogin success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

+ (void)getWithURL:(NSString *)url params:(id)params success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;


+ (void)uploadFile:(NSData *)data fileName:(NSString *)fileName success:(void(^)(NSString *))success failure:(void(^)(void))failure;

+ (void)getTranslate:(NSString *)text sucess:(void(^)(NSString *))success;


+(void)getAppConfig;


+ (void)PostLogWithPage:(NSString *)page;
@end

NS_ASSUME_NONNULL_END
